Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fsspec is inconsistant when doing fs.ls #3805

Merged
merged 1 commit into from
Oct 3, 2020

Conversation

f4hy
Copy link
Contributor

@f4hy f4hy commented Oct 2, 2020

What does this PR do?

FSSpec, which we use for doing IO which may or may not be local, has some inconsistancies in how it lists files. On local and some remote systems fs.ls(path) gives a list of strings and others (hdfs for example) it gives a list of dictionaries with the paths and meta data.

Switching to fs.listdir(path) seems to give consistent behavior on the platforms I tested. Despite fsspec listing that ls is an alias for listdir in their documentation.

Fixes # (issue)

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@mergify mergify bot requested a review from a team October 2, 2020 20:49
@codecov
Copy link

codecov bot commented Oct 2, 2020

Codecov Report

Merging #3805 into master will increase coverage by 2%.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #3805    +/-   ##
=======================================
+ Coverage      88%     90%    +2%     
=======================================
  Files         110     110            
  Lines        8873    8617   -256     
=======================================
- Hits         7770    7732    -38     
+ Misses       1103     885   -218     

@f4hy
Copy link
Contributor Author

f4hy commented Oct 2, 2020

The failing tests seem to be an nvidia mirror issue?
E: Failed to fetch https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/Packages.gz File has unexpected size (47871 != 49498). Mirror sync in progress? [IP: 152.195.19.142 443]

@Borda Borda added the bug Something isn't working label Oct 2, 2020
@ananthsub
Copy link
Contributor

Good catch! Did you file an issue for fsspec to fix their HDFS implementation?

@williamFalcon williamFalcon merged commit b14c4d4 into Lightning-AI:master Oct 3, 2020
@Borda
Copy link
Member

Borda commented Oct 3, 2020

Can we get a test for this fix?

1 similar comment
@Borda
Copy link
Member

Borda commented Oct 3, 2020

Can we get a test for this fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants